import { IsEnum, IsNotEmpty, MaxLength } from 'class-validator';
import { MotionCategory } from 'src/types/motion';
import OptionalDto from './optional.motion.dto';

export default class CreateMotionDto extends OptionalDto {
  @IsNotEmpty({ message: 'name不能为空' })
  @MaxLength(20, { message: 'name最长20个字符' })
  name: string;

  @IsNotEmpty({ message: 'category不能为空' })
  @IsEnum(MotionCategory, { message: '无效category' })
  category: MotionCategory;
}
